package letsjava.utils;

import java.io.*;
import java.util.*;

public class NSConfig {
	public static String rootPath = System.getProperty("user.dir");
	
	public static HashMap<String,String> getConfig() throws Exception{
		Properties prop = new Properties();
		FileInputStream in = new FileInputStream(rootPath+"/../setting.ini");
		Scanner scan = new Scanner(in);
		HashMap<String,String> a = new HashMap<String,String>();
		while(scan.hasNextLine()){
			String line = scan.nextLine();
			String[] pair = line.trim().split("=");
			a.put(pair[0], pair[1]);
			
		}
		return a;
	}
	
	public static  void main(String[] args) throws Exception{
		System.out.println(NSConfig.getConfig());
	}
}
